#include "heibai_rule.h"
#include "heibai_chessboard_cmd.h"
#include "heibai_chessboard_opencv.h"
#include <stdio.h>
#include <opencv/cv.h>
#include <opencv/highgui.h>

class CPeoUser : public CHBUser
{
	public :
		void Play();
};

void CPeoUser::Play()
{
	int x, y;
	GetSig(x, y);
	PutChess(x, y);
}

int main()
{
	CPeoUser p1;
	CHBChessBoard * pView = new CHBChessBoardOpencv((char *)"abc");
	CHBRule * pRule = new CHBRule(pView);
	pRule->SetUser(&p1, 1);
	pRule->SetUser(&p1, 2);
	pRule->Run();
	cvWaitKey(0);
	return 0;
}

